<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        label.error{
            color: red;
        }
        input.error{
            background-color: #ffcccc;
        }
    </style>
</head>
<body>
<form>
    <div>
        <a href="https://www.baidu.com/">百度</a>fgdsfgdsfgsdf
    </div>
    <!--<label class="error" for="firstName"></label>-->
    <label class="error" >firstName</label><br>
    输入框：<input class="error">
</form>
<table border="1">
           <tr>
            <th>序号</th>
    <th>动物名称</th>
    <th>数量</th>
    <th>备注</th>
    </tr>
    <tr>
    <td>1</td>
    <td>大马猴</td>
    <td>10</td>
    <td>机灵古怪，俏皮活泼</td>
    </tr>
    <tr>
    <td>2</td>
    <td>大熊猫</td>
    <td>80</td>
    <td>体型笨重，喜欢吃竹子</td>
    </tr>
    <tr>
    <td>3</td>
    <td>澳洲羊驼</td>
    <td>13</td>
    <td>长相奇特，大国人俗称其草泥马</td>
    </tr>
    <tr>
    <td>4</td>
    <td>峨眉山猴</td>
    <td>90</td>
    <td>不怕人，有时候发贱抢游客面包吃</td>
    </tr>
        </table>
  <form>
      <input id="test" type="button" value="测试">
  </form>
  <script>
      $(function(){
          document.getElementById("test").click=function () {
              alert(1);
          }
      });
  </script>
</body>
</html>